package org.dromara.xxmj.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.dromara.xxmj.domain.po.UserErrorQuestionInfo;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 小巷密卷用户扩展视图对象
 *
 * @author Lion Li
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = UserErrorQuestionInfo.class)
public class UserErrorQuestionInfoVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 索引
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 课程ID
     */
    private Long courseId;

    /**
     * 问题ID
     */
    private Long questionId;

    /**
     * 学生ID
     */
    private String stuId;

    /**
     * 题目内容
     */
    @Schema(description = "题目内容")
    private String title;

    /**
     * 题目类型（0单选 1多选 2判断）
     */
    @Schema(description = "题目类型")
    private String type;

    /**
     * 题目类型
     */
    @Schema(description = "题库类型")
    private String questionType;

    /**
     * 选项内容（JSON格式）
     */
    @Schema(description = "选项内容")
    private String options;

    /**
     * 选项内容（JSON格式）
     */
    @Schema(description = "选项列表")
    @TableField(value = "options", typeHandler = JacksonTypeHandler.class)
    private List<Map<String, String>> optionsList;

    /**
     * 正确答案
     */
    @Schema(description = "正确答案")
    private String answer;

    /**
     * 解析
     */
    @Schema(description = "解析")
    private String analysis;

    /**
     * 图片
     */
    @ExcelProperty(value = "图片")
    private String image;


    /**
     * 保存时间
     */
    private Date saveTime;

    /**
     * 是否收藏
     */
    @Schema(description = "是否收藏")
    private Integer isCollect;


}
